<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<%@ page import="org.codehaus.groovy.grails.commons.ConfigurationHolder" %>
<%@ page import="net.tribal.comic.entities.User" %>

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <title><g:message code="title.user.contributions.nav"/></title>
    </head>
    
    <body>
    	<div class="navButtonsTop rounded-corners">
			<h1 class="title"><g:message code="title.user.contributions" args="[userName]"/></h1>
		</div>
		
		<div class="element rounded-corners">
			<div>
				<ul>
					<g:message code="default.label.contributions.comics"/>:
					<g:if test="${comics}">
						<g:each in="${comics}" var="comic">
							<li>
								<g:link controller="comic" action="show" id="${comic.id}">${comic.title}</g:link>
							</li>
						</g:each>
					</g:if>
					<g:else>
						<li>
							<g:message code="default.label.no.contributions"/>
						</li>
					</g:else>
				</ul>
			</div>
			
			<div>
				<ul>
					<g:message code="default.label.contributions.pages"/>:
					<g:if test="${pages}">
						<g:each in="${pages}" var="page">
							<li>
								<g:link controller="page" action="show" id="${page.id}">${page.title}</g:link>
							</li>
						</g:each>
					</g:if>
					<g:else>
						<li>
							<g:message code="default.label.no.contributions"/>
						</li>
					</g:else>
				</ul>
			</div>
			
			<div>
				<ul>
					<g:message code="default.label.contributions.alterPages"/>:
					<g:if test="${alterPages}">
						<g:each in="${alterPages}" var="alterPage">
							<li>
								<g:link controller="alterPage" action="show" id="${alterPage.id}">${alterPage.title}</g:link>
							</li>
						</g:each>
					</g:if>
					<g:else>
						<li>
							<g:message code="default.label.no.contributions"/>
						</li>
					</g:else>
				</ul>
			</div>
			
		</div>
		<div class="navButtons rounded-corners">
			<div class="right">
			<g:form>
				<input type="hidden" name="id" value="${userId}" />
				<g:actionSubmit class="back" action="Show" value="${message(code:'default.button.back')}" />
			</g:form>
		</div>
	</div>
		
    </body>
</html>